<%--
  Created by IntelliJ IDEA.
  User: hellcat
  Date: 2020/2/18
  Time: 18:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@include file="extra/header.jsp" %>
<body>
<div class="layui-form" style="margin-top: 20px;">
    <div class="layui-form-item">
        <label class="layui-form-label">角色:</label>
        <div class="layui-input-inline">
            <input type="text" value="${role.role}" class="layui-input"
                   style="width: 200px" name="authorityRoleName" autocomplete="off">
        </div>
        <div style="text-align: center">
            <button type="button" id="authorityCheckboxAll" class="layui-btn layui-btn-primary layui-btn-xs">全选</button>
            <button type="button" id="authorityCheckboxNo" class="layui-btn layui-btn-primary layui-btn-xs">全不选</button>
        </div>

    </div>
    <table class="layui-table">
        <tbody>
        <c:forEach items="${authority }" var="authority">
            <tr>
                <td rowspan="${fn:length(authority.children)+2}">
                    <input type="checkbox" value="${authority.value}" lay-filter="checkbox0" name="checkbox"
                           title="${authority.title}" checkId="${authority.value}"
                        ${authority.checked} lay-skin="primary">
                </td>
            <tr>
            <c:forEach items="${authority.children }" var="children">
                <tr>
                    <td>
                        <input type="checkbox" value="${children.value}" name="checkbox"
                               title="${children.title}" ${children.checked}
                               checkPid="${authority.value}" lay-filter="checkbox1" lay-skin="primary">
                    </td>
                </tr>
            </c:forEach>
        </c:forEach>
        </tbody>
    </table>
</div>
<script src="../static/js/authority.js"></script>
</body>
</html>

